From: Keir Fraser Date: Thu, 16 Oct 2008 17:36:43 +0000 (+0100) Subject: Fix SCHEDOP_poll to avoid wakeup-waiting race on interrupt delivery. X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~14066^2~37 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/success//%22http:/www.example.com/cgi/success/?a=commitdiff_plain;h=27b186a0dbe932c15195a24a520b92a2d2282d92;p=xen.git Fix SCHEDOP_poll to avoid wakeup-waiting race on interrupt delivery. Race found by Jan Beulich. Signed-off-by: Keir Fraser --- diff --git a/xen/common/schedule.c b/xen/common/schedule.c index 12882d0204..04b09e2168 100644 --- a/xen/common/schedule.c +++ b/xen/common/schedule.c @@ -455,6 +455,10 @@ static long do_poll(struct sched_poll *sched_poll) goto out; #endif + rc = 0; + if ( local_events_need_delivery() ) + goto out; + for ( i = 0; i < sched_poll->nr_ports; i++ ) { rc = -EFAULT;